package com.welkom.everydate.util;

import java.io.IOException;
import java.util.Properties;

import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PropertiesLoaderUtils;

public class MessageReader {
	private  static final  Resource resource =new ClassPathResource("/messages/messages.properties");
	private static Properties props =null;
	static {
		try {
			props= PropertiesLoaderUtils.loadProperties(resource);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	public static String getMessage(String messageId){
		return props.getProperty(messageId);
	}

}
